home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Appearance.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  59.7 KB  |  1,402 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Appearance.p
  3.  
  4.      Contains:    Appearance Manager Interfaces.
  5.  
  6.      Version:    Technology:    Allegro
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Appearance;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __APPEARANCE__}
  27. {$SETC __APPEARANCE__ := 1}
  28.  
  29. {$I+}
  30. {$SETC AppearanceIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __QUICKDRAW__}
  37. {$I Quickdraw.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __TEXTEDIT__}
  40. {$I TextEdit.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __QDOFFSCREEN__}
  43. {$I QDOffscreen.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __MACWINDOWS__}
  46. {$I MacWindows.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __CONTROLS__}
  49. {$I Controls.p}
  50. {$ENDC}
  51.  
  52. {——————————————————————————————————————————————————————————————————————————————————}
  53. { Appearance Manager constants, etc.                                                }
  54. {——————————————————————————————————————————————————————————————————————————————————}
  55.  
  56. {$PUSH}
  57. {$ALIGN MAC68K}
  58. {$LibExport+}
  59.  
  60.  
  61. CONST
  62.                                                                 {  Appearance Trap Number  }
  63.     _AppearanceDispatch            = $AA74;
  64.  
  65. { Gestalt selector and values for the Appearance Manager }
  66.     gestaltAppearanceAttr        = 'appr';
  67.     gestaltAppearanceExists        = 0;
  68.     gestaltAppearanceCompatMode    = 1;
  69.  
  70. { Gestalt selector for determining Appearance Manager version      }
  71. { If this selector does not exist, but gestaltAppearanceAttr     }
  72. { does, it indicates that the 1.0 version is installed. This     }
  73. { gestalt returns a BCD number representing the version of the     }
  74. { Appearance Manager that is currently running, e.g. 0x0101 for }
  75. { version 1.0.1.                                                 }
  76.     gestaltAppearanceVersion    = 'apvr';
  77.  
  78. { Appearance Manager Apple Events (1.1 and later)                 }
  79.     kAppearanceEventClass        = 'appr';                        {  Event Class  }
  80.     kAEAppearanceChanged        = 'thme';                        {  Appearance changed (e.g. platinum to hi-tech)  }
  81.     kAESystemFontChanged        = 'sysf';                        {  system font changed  }
  82.     kAESmallSystemFontChanged    = 'ssfn';                        {  small system font changed  }
  83.     kAEViewsFontChanged            = 'vfnt';                        {  views font changed  }
  84.  
  85. {——————————————————————————————————————————————————————————————————————————————————}
  86. { Appearance Manager file types                                                    }
  87. {——————————————————————————————————————————————————————————————————————————————————}
  88.     kThemeDataFileType            = 'thme';                        {  file type for theme files  }
  89.     kThemePlatinumFileType        = 'pltn';                        {  file type for platinum appearance  }
  90.     kThemeCustomThemesFileType    = 'scen';                        {  file type for user themes  }
  91.     kThemeSoundTrackFileType    = 'tsnd';
  92.  
  93. { Appearance Manager Error Codes }
  94.     themeInvalidBrushErr        = -30560;                        {  pattern index invalid  }
  95.     themeProcessRegisteredErr    = -30561;
  96.     themeProcessNotRegisteredErr = -30562;
  97.     themeBadTextColorErr        = -30563;
  98.     themeHasNoAccentsErr        = -30564;
  99.     themeBadCursorIndexErr        = -30565;
  100.     themeScriptFontNotFoundErr    = -30566;                        {  theme font requested for uninstalled script system  }
  101.     themeMonitorDepthNotSupportedErr = -30567;                    {  theme not supported at monitor depth  }
  102.  
  103.     kThemeBrushDialogBackgroundActive = 1;                        {  Dialogs  }
  104.     kThemeBrushDialogBackgroundInactive = 2;                    {  Dialogs  }
  105.     kThemeBrushAlertBackgroundActive = 3;
  106.     kThemeBrushAlertBackgroundInactive = 4;
  107.     kThemeBrushModelessDialogBackgroundActive = 5;
  108.     kThemeBrushModelessDialogBackgroundInactive = 6;
  109.     kThemeBrushUtilityWindowBackgroundActive = 7;                {  Miscellaneous  }
  110.     kThemeBrushUtilityWindowBackgroundInactive = 8;                {  Miscellaneous  }
  111.     kThemeBrushListViewSortColumnBackground = 9;                {  Finder  }
  112.     kThemeBrushListViewBackground = 10;
  113.     kThemeBrushIconLabelBackground = 11;
  114.     kThemeBrushListViewSeparator = 12;
  115.     kThemeBrushChasingArrows    = 13;
  116.     kThemeBrushDragHilite        = 14;
  117.     kThemeBrushDocumentWindowBackground = 15;
  118.     kThemeBrushFinderWindowBackground = 16;
  119.  
  120. { Brushes available in Appearance 1.1 or later }
  121.     kThemeBrushScrollBarDelimiterActive = 17;
  122.     kThemeBrushScrollBarDelimiterInactive = 18;
  123.     kThemeBrushFocusHighlight    = 19;
  124.     kThemeBrushPopupArrowActive    = 20;
  125.     kThemeBrushPopupArrowPressed = 21;
  126.     kThemeBrushPopupArrowInactive = 22;
  127.     kThemeBrushAppleGuideCoachmark = 23;
  128.     kThemeBrushIconLabelBackgroundSelected = 24;
  129.     kThemeBrushStaticAreaFill    = 25;
  130.     kThemeBrushActiveAreaFill    = 26;
  131.     kThemeBrushButtonFrameActive = 27;
  132.     kThemeBrushButtonFrameInactive = 28;
  133.     kThemeBrushButtonFaceActive    = 29;
  134.     kThemeBrushButtonFaceInactive = 30;
  135.     kThemeBrushButtonFacePressed = 31;
  136.     kThemeBrushButtonActiveDarkShadow = 32;
  137.     kThemeBrushButtonActiveDarkHighlight = 33;
  138.     kThemeBrushButtonActiveLightShadow = 34;
  139.     kThemeBrushButtonActiveLightHighlight = 35;
  140.     kThemeBrushButtonInactiveDarkShadow = 36;
  141.     kThemeBrushButtonInactiveDarkHighlight = 37;
  142.     kThemeBrushButtonInactiveLightShadow = 38;
  143.     kThemeBrushButtonInactiveLightHighlight = 39;
  144.     kThemeBrushButtonPressedDarkShadow = 40;
  145.     kThemeBrushButtonPressedDarkHighlight = 41;
  146.     kThemeBrushButtonPressedLightShadow = 42;
  147.     kThemeBrushButtonPressedLightHighlight = 43;
  148.     kThemeBrushBevelActiveLight    = 44;
  149.     kThemeBrushBevelActiveDark    = 45;
  150.     kThemeBrushBevelInactiveLight = 46;
  151.     kThemeBrushBevelInactiveDark = 47;
  152.  
  153. { These values are meta-brushes, specific colors that do not         }
  154. { change from theme to theme. You can use them instead of using    }
  155. { direct RGB values.                                                 }
  156.     kThemeBrushBlack            = -1;
  157.     kThemeBrushWhite            = -2;
  158.  
  159.  
  160. TYPE
  161.     ThemeBrush                            = SInt16;
  162.  
  163. CONST
  164.     kThemeTextColorDialogActive    = 1;
  165.     kThemeTextColorDialogInactive = 2;
  166.     kThemeTextColorAlertActive    = 3;
  167.     kThemeTextColorAlertInactive = 4;
  168.     kThemeTextColorModelessDialogActive = 5;
  169.     kThemeTextColorModelessDialogInactive = 6;
  170.     kThemeTextColorWindowHeaderActive = 7;
  171.     kThemeTextColorWindowHeaderInactive = 8;
  172.     kThemeTextColorPlacardActive = 9;
  173.     kThemeTextColorPlacardInactive = 10;
  174.     kThemeTextColorPlacardPressed = 11;
  175.     kThemeTextColorPushButtonActive = 12;
  176.     kThemeTextColorPushButtonInactive = 13;
  177.     kThemeTextColorPushButtonPressed = 14;
  178.     kThemeTextColorBevelButtonActive = 15;
  179.     kThemeTextColorBevelButtonInactive = 16;
  180.     kThemeTextColorBevelButtonPressed = 17;
  181.     kThemeTextColorPopupButtonActive = 18;
  182.     kThemeTextColorPopupButtonInactive = 19;
  183.     kThemeTextColorPopupButtonPressed = 20;
  184.     kThemeTextColorIconLabel    = 21;
  185.     kThemeTextColorListView        = 22;
  186.  
  187. { Text Colors available in Appearance 1.0.1 or later }
  188.     kThemeTextColorDocumentWindowTitleActive = 23;
  189.     kThemeTextColorDocumentWindowTitleInactive = 24;
  190.     kThemeTextColorMovableModalWindowTitleActive = 25;
  191.     kThemeTextColorMovableModalWindowTitleInactive = 26;
  192.     kThemeTextColorUtilityWindowTitleActive = 27;
  193.     kThemeTextColorUtilityWindowTitleInactive = 28;
  194.     kThemeTextColorPopupWindowTitleActive = 29;
  195.     kThemeTextColorPopupWindowTitleInactive = 30;
  196.     kThemeTextColorRootMenuActive = 31;
  197.     kThemeTextColorRootMenuSelected = 32;
  198.     kThemeTextColorRootMenuDisabled = 33;
  199.     kThemeTextColorMenuItemActive = 34;
  200.     kThemeTextColorMenuItemSelected = 35;
  201.     kThemeTextColorMenuItemDisabled = 36;
  202.     kThemeTextColorPopupLabelActive = 37;
  203.     kThemeTextColorPopupLabelInactive = 38;
  204.  
  205.  
  206. { Text colors available in Appearance 1.1 or later }
  207.     kThemeTextColorTabFrontActive = 39;
  208.     kThemeTextColorTabNonFrontActive = 40;
  209.     kThemeTextColorTabNonFrontPressed = 41;
  210.     kThemeTextColorTabFrontInactive = 42;
  211.     kThemeTextColorTabNonFrontInactive = 43;
  212.     kThemeTextColorIconLabelSelected = 44;
  213.     kThemeTextColorBevelButtonStickyActive = 45;
  214.     kThemeTextColorBevelButtonStickyInactive = 46;
  215.  
  216. { These values are specific colors that do not change from             }
  217. { theme to theme. You can use them instead of using direct RGB values. }
  218.     kThemeTextColorBlack        = -1;
  219.     kThemeTextColorWhite        = -2;
  220.  
  221.  
  222. TYPE
  223.     ThemeTextColor                        = SInt16;
  224. { States to draw primitives: disabled, active, and pressed (hilited) }
  225.  
  226. CONST
  227.     kThemeStateInactive            = 0;
  228.     kThemeStateActive            = 1;
  229.     kThemeStatePressed            = 2;
  230.  
  231. { obsolete name }
  232.     kThemeStateDisabled            = 0;
  233.  
  234.     kThemeStatePressedUp        = 2;                            {  draw with up pressed        (increment/decrement buttons)  }
  235.     kThemeStatePressedDown        = 3;                            {  draw with down pressed    (increment/decrement buttons)  }
  236.  
  237.  
  238. TYPE
  239.     ThemeDrawState                        = UInt32;
  240. {——————————————————————————————————————————————————————————————————————————————————}
  241. { Theme cursor selectors available in Appearance 1.1 or later                        }
  242. {——————————————————————————————————————————————————————————————————————————————————}
  243.  
  244. CONST
  245.     kThemeArrowCursor            = 0;
  246.     kThemeCopyArrowCursor        = 1;
  247.     kThemeAliasArrowCursor        = 2;
  248.     kThemeContextualMenuArrowCursor = 3;
  249.     kThemeIBeamCursor            = 4;
  250.     kThemeCrossCursor            = 5;
  251.     kThemePlusCursor            = 6;
  252.     kThemeWatchCursor            = 7;                            {  Can Animate  }
  253.     kThemeClosedHandCursor        = 8;
  254.     kThemeOpenHandCursor        = 9;
  255.     kThemePointingHandCursor    = 10;
  256.     kThemeCountingUpHandCursor    = 11;                            {  Can Animate  }
  257.     kThemeCountingDownHandCursor = 12;                            {  Can Animate  }
  258.     kThemeCountingUpAndDownHandCursor = 13;                        {  Can Animate  }
  259.     kThemeSpinningCursor        = 14;                            {  Can Animate  }
  260.     kThemeResizeLeftCursor        = 15;
  261.     kThemeResizeRightCursor        = 16;
  262.     kThemeResizeLeftRightCursor    = 17;
  263.  
  264.  
  265. TYPE
  266.     ThemeCursor                            = UInt32;
  267. {——————————————————————————————————————————————————————————————————————————————————}
  268. { Theme menu bar drawing states                                                    }
  269. {——————————————————————————————————————————————————————————————————————————————————}
  270.  
  271. CONST
  272.     kThemeMenuBarNormal            = 0;
  273.     kThemeMenuBarSelected        = 1;
  274.  
  275.  
  276. TYPE
  277.     ThemeMenuBarState                    = UInt16;
  278. { attributes }
  279.  
  280. CONST
  281.     kThemeMenuSquareMenuBar        = $01;
  282.  
  283. {——————————————————————————————————————————————————————————————————————————————————}
  284. { Theme menu drawing states                                                        }
  285. {——————————————————————————————————————————————————————————————————————————————————}
  286.     kThemeMenuActive            = 0;
  287.     kThemeMenuSelected            = 1;
  288.     kThemeMenuInactive            = 3;
  289.  
  290. { obsolete name }
  291.     kThemeMenuDisabled            = 3;
  292.  
  293.  
  294. TYPE
  295.     ThemeMenuState                        = UInt16;
  296. {——————————————————————————————————————————————————————————————————————————————————————————}
  297. { MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire     }
  298. { menu is inactive                                                                            }
  299. {——————————————————————————————————————————————————————————————————————————————————————————}
  300.  
  301. CONST
  302.     kThemeMenuTypePullDown        = 0;
  303.     kThemeMenuTypePopUp            = 1;
  304.     kThemeMenuTypeHierarchical    = 2;
  305.     kThemeMenuTypeInactive        = $0100;
  306.  
  307.  
  308. TYPE
  309.     ThemeMenuType                        = UInt16;
  310.  
  311. CONST
  312.     kThemeMenuItemPlain            = 0;
  313.     kThemeMenuItemHierarchical    = 1;                            {  item has hierarchical arrow }
  314.     kThemeMenuItemScrollUpArrow    = 2;                            {  for scrollable menus, indicates item is scroller }
  315.     kThemeMenuItemScrollDownArrow = 3;
  316.     kThemeMenuItemAtTop            = $0100;                        {  indicates item is being drawn at top of menu }
  317.     kThemeMenuItemAtBottom        = $0200;                        {  indicates item is being drawn at bottom of menu }
  318.     kThemeMenuItemHierBackground = $0400;                        {  item is within a hierarchical menu }
  319.     kThemeMenuItemPopUpBackground = $0800;                        {  item is within a popped up menu }
  320.     kThemeMenuItemHasIcon        = $8000;                        {  add into non-arrow type when icon present. }
  321.  
  322.  
  323. TYPE
  324.     ThemeMenuItemType                    = UInt16;
  325. {——————————————————————————————————————————————————————————————————————————————————————————}
  326. { Theme Backgrounds                                                                        }
  327. {——————————————————————————————————————————————————————————————————————————————————————————}
  328.  
  329. CONST
  330.     kThemeBackgroundTabPane        = 1;
  331.     kThemeBackgroundPlacard        = 2;
  332.     kThemeBackgroundWindowHeader = 3;
  333.     kThemeBackgroundListViewWindowHeader = 4;
  334.  
  335.  
  336. TYPE
  337.     ThemeBackgroundKind                    = UInt32;
  338. {——————————————————————————————————————————————————————————————————————————————————————————}
  339. { Theme Collection tags for Get/SetTheme                                                    }
  340. {——————————————————————————————————————————————————————————————————————————————————————————}
  341.  
  342. CONST
  343.     kThemeNameTag                = 'name';                        {  Str255 }
  344.     kThemeAppearanceFileNameTag    = 'thme';                        {  Str255 }
  345.     kThemeVariantNameTag        = 'varn';                        {  Str255 }
  346.     kThemeSystemFontTag            = 'lgsf';                        {  Str255 }
  347.     kThemeSmallSystemFontTag    = 'smsf';                        {  Str255 }
  348.     kThemeViewsFontTag            = 'vfnt';                        {  Str255 }
  349.     kThemeViewsFontSizeTag        = 'vfsz';                        {  SInt16 }
  350.     kThemeDesktopPatternNameTag    = 'patn';                        {  Str255 }
  351.     kThemeDesktopPatternTag        = 'patt';                        {  <variable-length data> (flattened pattern) }
  352.     kThemeDesktopPictureNameTag    = 'dpnm';                        {  Str255 }
  353.     kThemeDesktopPictureAliasTag = 'dpal';                        {  <alias handle> }
  354.     kThemeDesktopPictureAlignmentTag = 'dpan';                    {  UInt32 }
  355.     kThemeHighlightColorNameTag    = 'hcnm';                        {  Str255 }
  356.     kThemeHighlightColorTag        = 'hcol';                        {  RGBColor }
  357.     kThemeExamplePictureIDTag    = 'epic';                        {  SInt16 }
  358.     kThemeSoundsEnabledTag        = 'snds';                        {  Boolean }
  359.     kThemeSoundTrackNameTag        = 'sndt';                        {  Str255 }
  360.     kThemeSoundMaskTag            = 'smsk';                        {  UInt32 }
  361.     kThemeUserDefinedTag        = 'user';                        {  Boolean (this should _always_ be true if present - used by Control Panel). }
  362.     kThemeScrollBarArrowStyleTag = 'sbar';                        {  ThemeScrollBarArrowStyle }
  363.     kThemeScrollBarThumbStyleTag = 'sbth';                        {  ThemeScrollBarThumbStyle }
  364.     kThemeSmoothFontEnabledTag    = 'smoo';                        {  Boolean }
  365.     kThemeSmoothFontMinSizeTag    = 'smos';                        {  UInt16 (must be >= 12 and <= 24) }
  366.     kThemeDblClickCollapseTag    = 'coll';                        {  Boolean }
  367.  
  368. {——————————————————————————————————————————————————————————————————————————————————————————}
  369. { Theme Control Settings                                                                    }
  370. {——————————————————————————————————————————————————————————————————————————————————————————}
  371.     kThemeCheckBoxClassicX        = 0;                            {  check box with an 'X' }
  372.     kThemeCheckBoxCheckMark        = 1;                            {  check box with a real check mark }
  373.  
  374.  
  375. TYPE
  376.     ThemeCheckBoxStyle                    = UInt16;
  377.  
  378. CONST
  379.     kThemeScrollBarArrowsSingle    = 0;                            {  single arrow on each end }
  380.     kThemeScrollBarArrowsLowerRight = 1;                        {  double arrows only on right or bottom }
  381.  
  382.  
  383. TYPE
  384.     ThemeScrollBarArrowStyle            = UInt16;
  385.  
  386. CONST
  387.     kThemeScrollBarThumbNormal    = 0;                            {  normal, classic thumb size }
  388.     kThemeScrollBarThumbProportional = 1;                        {  proportional thumbs }
  389.  
  390.  
  391. TYPE
  392.     ThemeScrollBarThumbStyle            = UInt16;
  393. {——————————————————————————————————————————————————————————————————————————————————————————}
  394. { Font constants                                                                            }
  395. {——————————————————————————————————————————————————————————————————————————————————————————}
  396.  
  397. CONST
  398.     kThemeSystemFont            = 0;
  399.     kThemeSmallSystemFont        = 1;
  400.     kThemeSmallEmphasizedSystemFont = 2;
  401.     kThemeViewsFont                = 3;
  402.  
  403.  
  404. TYPE
  405.     ThemeFontID                            = UInt16;
  406. {——————————————————————————————————————————————————————————————————————————————————————————}
  407. { Tab constants                                                                            }
  408. {——————————————————————————————————————————————————————————————————————————————————————————}
  409.  
  410. CONST
  411.     kThemeTabNonFront            = 0;
  412.     kThemeTabNonFrontPressed    = 1;
  413.     kThemeTabNonFrontInactive    = 2;
  414.     kThemeTabFront                = 3;
  415.     kThemeTabFrontInactive        = 4;
  416.  
  417.  
  418. TYPE
  419.     ThemeTabStyle                        = UInt16;
  420.  
  421. CONST
  422.     kThemeTabNorth                = 0;
  423.     kThemeTabSouth                = 1;
  424.     kThemeTabEast                = 2;
  425.     kThemeTabWest                = 3;
  426.  
  427.  
  428. TYPE
  429.     ThemeTabDirection                    = UInt16;
  430. { NOTE ON TAB HEIGHT                                                                        }
  431. { Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects    }
  432. { to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the    }
  433. { front are only drawn down to where they meet the frame, as if the height was just        }
  434. { kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for    }
  435. { East and West tabs, the height referred to below is actually the width.                    }
  436.  
  437. CONST
  438.     kThemeSmallTabHeight        = 16;                            {  amount small tabs protrude from frame. }
  439.     kThemeLargeTabHeight        = 21;                            {  amount large tabs protrude from frame. }
  440.     kThemeTabPaneOverlap        = 3;                            {  amount tabs overlap frame. }
  441.     kThemeSmallTabHeightMax        = 19;                            {  small tab height + overlap }
  442.     kThemeLargeTabHeightMax        = 24;                            {  large tab height + overlap }
  443.  
  444. {——————————————————————————————————————————————————————————————————————————————————————————}
  445. { Track kinds                                                                                }
  446. {——————————————————————————————————————————————————————————————————————————————————————————}
  447.     kThemeScrollBar                = 0;
  448.     kThemeSmallScrollBar        = 1;
  449.     kThemeSlider                = 2;
  450.     kThemeProgressBar            = 3;
  451.     kThemeIndeterminateBar        = 4;
  452.  
  453.  
  454. TYPE
  455.     ThemeTrackKind                        = UInt16;
  456. {——————————————————————————————————————————————————————————————————————————————————————————}
  457. { Track enable states                                                                        }
  458. {——————————————————————————————————————————————————————————————————————————————————————————}
  459.  
  460. CONST
  461.                                                                 {  track states  }
  462.     kThemeTrackActive            = 0;
  463.     kThemeTrackDisabled            = 1;
  464.     kThemeTrackNothingToScroll    = 2;
  465.  
  466.  
  467. TYPE
  468.     ThemeTrackEnableState                = UInt8;
  469. {——————————————————————————————————————————————————————————————————————————————————————————}
  470. { Track pressed states                                                                        }
  471. {——————————————————————————————————————————————————————————————————————————————————————————}
  472.  
  473. CONST
  474.                                                                 {  press states (ignored unless track is active)  }
  475.     kThemeLeftOutsideArrowPressed = $01;
  476.     kThemeLeftInsideArrowPressed = $02;
  477.     kThemeLeftTrackPressed        = $04;
  478.     kThemeThumbPressed            = $08;
  479.     kThemeRightTrackPressed        = $10;
  480.     kThemeRightInsideArrowPressed = $20;
  481.     kThemeRightOutsideArrowPressed = $40;
  482.     kThemeTopOutsideArrowPressed = $01;
  483.     kThemeTopInsideArrowPressed    = $02;
  484.     kThemeTopTrackPressed        = $04;
  485.     kThemeBottomTrackPressed    = $10;
  486.     kThemeBottomInsideArrowPressed = $20;
  487.     kThemeBottomOutsideArrowPressed = $40;
  488.  
  489.  
  490. TYPE
  491.     ThemeTrackPressState                = UInt8;
  492. {——————————————————————————————————————————————————————————————————————————————————————————}
  493. { Thumb directions                                                                            }
  494. {——————————————————————————————————————————————————————————————————————————————————————————}
  495.  
  496. CONST
  497.                                                                 {  thumb direction  }
  498.     kThemeThumbPlain            = 0;
  499.     kThemeThumbUpward            = 1;
  500.     kThemeThumbDownward            = 2;
  501.  
  502.  
  503. TYPE
  504.     ThemeThumbDirection                    = UInt8;
  505. {——————————————————————————————————————————————————————————————————————————————————————————}
  506. { Track attributes                                                                            }
  507. {——————————————————————————————————————————————————————————————————————————————————————————}
  508.  
  509. CONST
  510.     kThemeTrackHorizontal        = $01;                            {  track is drawn horizontally }
  511.     kThemeTrackRightToLeft        = $02;                            {  track progresses from right to left }
  512.     kThemeTrackShowThumb        = $04;                            {  track's thumb should be drawn }
  513.  
  514.  
  515. TYPE
  516.     ThemeTrackAttributes                = UInt16;
  517. {——————————————————————————————————————————————————————————————————————————————————————————}
  518. { Track info block                                                                            }
  519. {——————————————————————————————————————————————————————————————————————————————————————————}
  520.     ScrollBarTrackInfoPtr = ^ScrollBarTrackInfo;
  521.     ScrollBarTrackInfo = RECORD
  522.         viewsize:                SInt32;                                    {  current view range size  }
  523.         pressState:                SInt8;                                    {  pressed parts state  }
  524.     END;
  525.  
  526.     SliderTrackInfoPtr = ^SliderTrackInfo;
  527.     SliderTrackInfo = RECORD
  528.         thumbDir:                SInt8;                                    {  thumb direction  }
  529.         pressState:                SInt8;                                    {  pressed parts state  }
  530.     END;
  531.  
  532.     ProgressTrackInfoPtr = ^ProgressTrackInfo;
  533.     ProgressTrackInfo = RECORD
  534.         phase:                    SInt8;                                    {  phase for indeterminate progress  }
  535.     END;
  536.  
  537.     ThemeTrackDrawInfoPtr = ^ThemeTrackDrawInfo;
  538.     ThemeTrackDrawInfo = RECORD
  539.         kind:                    ThemeTrackKind;                            {  what kind of track this info is for  }
  540.         bounds:                    Rect;                                    {  track basis rectangle  }
  541.         min:                    SInt32;                                    {  min track value  }
  542.         max:                    SInt32;                                    {  max track value  }
  543.         value:                    SInt32;                                    {  current thumb value  }
  544.         reserved:                UInt32;
  545.         attributes:                ThemeTrackAttributes;                    {  various track attributes  }
  546.         enableState:            SInt8;                                    {  enable state  }
  547.         filler1:                SInt8;
  548.         CASE INTEGER OF
  549.         0: (
  550.             scrollbar:            ScrollBarTrackInfo;
  551.             );
  552.         1: (
  553.             slider:                SliderTrackInfo;
  554.             );
  555.         2: (
  556.             progress:            ProgressTrackInfo;
  557.             );
  558.     END;
  559.  
  560. {——————————————————————————————————————————————————————————————————————————————————————————}
  561. { ThemeWindowAttributes                                                                    }
  562. {——————————————————————————————————————————————————————————————————————————————————————————}
  563.  
  564. CONST
  565.     kThemeWindowHasGrow            = $01;                            {  can the size of the window be changed by the user?  }
  566.     kThemeWindowHasHorizontalZoom = $08;                        {  window can zoom only horizontally  }
  567.     kThemeWindowHasVerticalZoom    = $10;                            {  window can zoom only vertically  }
  568.     kThemeWindowHasFullZoom        = $18;                            {  window zooms in all directions  }
  569.     kThemeWindowHasCloseBox        = $20;                            {  window has a close box  }
  570.     kThemeWindowHasCollapseBox    = $40;                            {  window has a collapse box  }
  571.     kThemeWindowHasTitleText    = $80;                            {  window has a title/title icon  }
  572.     kThemeWindowIsCollapsed        = $0100;                        {  window is in the collapsed state  }
  573.  
  574.  
  575. TYPE
  576.     ThemeWindowAttributes                = UInt32;
  577. {——————————————————————————————————————————————————————————————————————————————————————————}
  578. { Window Types Supported by the Appearance Manager                                            }
  579. {——————————————————————————————————————————————————————————————————————————————————————————}
  580.  
  581. CONST
  582.     kThemeDocumentWindow        = 0;
  583.     kThemeDialogWindow            = 1;
  584.     kThemeMovableDialogWindow    = 2;
  585.     kThemeAlertWindow            = 3;
  586.     kThemeMovableAlertWindow    = 4;
  587.     kThemePlainDialogWindow        = 5;
  588.     kThemeShadowDialogWindow    = 6;
  589.     kThemePopupWindow            = 7;
  590.     kThemeUtilityWindow            = 8;
  591.     kThemeUtilitySideWindow        = 9;
  592.  
  593.  
  594. TYPE
  595.     ThemeWindowType                        = UInt16;
  596. {——————————————————————————————————————————————————————————————————————————————————————————}
  597. { Window Widgets Supported by the Appearance Manager                                        }
  598. {——————————————————————————————————————————————————————————————————————————————————————————}
  599.  
  600. CONST
  601.     kThemeWidgetCloseBox        = 0;
  602.     kThemeWidgetZoomBox            = 1;
  603.     kThemeWidgetCollapseBox        = 2;
  604.  
  605.  
  606. TYPE
  607.     ThemeTitleBarWidget                    = UInt16;
  608. {——————————————————————————————————————————————————————————————————————————————————————————}
  609. { Popup arrow orientations                                                                    }
  610. {——————————————————————————————————————————————————————————————————————————————————————————}
  611.  
  612. CONST
  613.     kThemeArrowLeft                = 0;
  614.     kThemeArrowDown                = 1;
  615.     kThemeArrowRight            = 2;
  616.     kThemeArrowUp                = 3;
  617.  
  618.  
  619. TYPE
  620.     ThemeArrowOrientation                = UInt16;
  621. {——————————————————————————————————————————————————————————————————————————————————————————}
  622. { Popup arrow sizes                                                                        }
  623. {——————————————————————————————————————————————————————————————————————————————————————————}
  624.  
  625. CONST
  626.     kThemeArrow3pt                = 0;
  627.     kThemeArrow5pt                = 1;
  628.     kThemeArrow7pt                = 2;
  629.     kThemeArrow9pt                = 3;
  630.  
  631.  
  632. TYPE
  633.     ThemePopupArrowSize                    = UInt16;
  634. {——————————————————————————————————————————————————————————————————————————————————————————}
  635. { Grow box directions                                                                        }
  636. {——————————————————————————————————————————————————————————————————————————————————————————}
  637.  
  638. CONST
  639.     kThemeGrowLeft                = $01;                            {  can grow to the left  }
  640.     kThemeGrowRight                = $02;                            {  can grow to the right  }
  641.     kThemeGrowUp                = $04;                            {  can grow up  }
  642.     kThemeGrowDown                = $08;                            {  can grow down  }
  643.  
  644.  
  645. TYPE
  646.     ThemeGrowDirection                    = UInt16;
  647. {——————————————————————————————————————————————————————————————————————————————————————————}
  648. { Button kinds                                                                                }
  649. {——————————————————————————————————————————————————————————————————————————————————————————}
  650.  
  651. CONST
  652.     kThemePushButton            = 0;
  653.     kThemeCheckBox                = 1;
  654.     kThemeRadioButton            = 2;
  655.     kThemeBevelButton            = 3;                            {  bevel button (obsolete)  }
  656.     kThemeArrowButton            = 4;                            {  popup button without text  (no label)  }
  657.     kThemePopupButton            = 5;                            {  popup button  }
  658.     kThemeDisclosureButton        = 6;
  659.     kThemeIncDecButton            = 7;                            {  increment/decrement buttons  (no label)  }
  660.     kThemeSmallBevelButton        = 8;                            {  small-shadow bevel button  }
  661.     kThemeMediumBevelButton        = 3;                            {  med-shadow bevel button  }
  662.     kThemeLargeBevelButton        = 9;                            {  large-shadow bevel button  }
  663.  
  664.  
  665. TYPE
  666.     ThemeButtonKind                        = UInt16;
  667. {——————————————————————————————————————————————————————————————————————————————————————————}
  668. { Common button values                                                                        }
  669. {——————————————————————————————————————————————————————————————————————————————————————————}
  670.  
  671. CONST
  672.     kThemeButtonOff                = 0;
  673.     kThemeButtonOn                = 1;
  674.     kThemeButtonMixed            = 2;
  675.     kThemeDisclosureRight        = 0;
  676.     kThemeDisclosureDown        = 1;
  677.     kThemeDisclosureLeft        = 2;
  678.  
  679.  
  680. TYPE
  681.     ThemeButtonValue                    = UInt16;
  682. {——————————————————————————————————————————————————————————————————————————————————————————}
  683. { Button adornment types                                                                    }
  684. {——————————————————————————————————————————————————————————————————————————————————————————}
  685.  
  686. CONST
  687.     kThemeAdornmentNone            = 0;
  688.     kThemeAdornmentDefault        = $01;                            {  if set, draw default ornamentation ( push button only )  }
  689.     kThemeAdornmentFocus        = $04;                            {  if set, draw focus  }
  690.     kThemeAdornmentRightToLeft    = $10;                            {  if set, draw right to left label  }
  691.     kThemeAdornmentDrawIndicatorOnly = $20;                        {  if set, don't draw or erase label ( radio, check, disclosure )  }
  692.  
  693.  
  694. TYPE
  695.     ThemeButtonAdornment                = UInt16;
  696. {——————————————————————————————————————————————————————————————————————————————————————————}
  697. { Button drawing info block                                                                }
  698. {——————————————————————————————————————————————————————————————————————————————————————————}
  699.     ThemeButtonDrawInfoPtr = ^ThemeButtonDrawInfo;
  700.     ThemeButtonDrawInfo = RECORD
  701.         state:                    ThemeDrawState;
  702.         value:                    ThemeButtonValue;
  703.         adornment:                ThemeButtonAdornment;
  704.     END;
  705.  
  706. {——————————————————————————————————————————————————————————————————————————————————————————}
  707. { Sound Support                                                                            }
  708. {——————————————————————————————————————————————————————————————————————————————————————————}
  709. {——————————————————————————————————————————————————————————————————————————————————————————}
  710. { Sound classes                                                                            }
  711. {                                                                                            }
  712. { You can use the constants below to set what sounds are active using the SetTheme API.    }
  713. { Use these with the kThemeSoundMask tag.                                                    }
  714. {——————————————————————————————————————————————————————————————————————————————————————————}
  715.  
  716. CONST
  717.     kThemeNoSounds                = 0;
  718.     kThemeWindowSoundsMask        = $01;
  719.     kThemeMenuSoundsMask        = $02;
  720.     kThemeControlSoundsMask        = $04;
  721.     kThemeFinderSoundsMask        = $08;
  722.  
  723.  
  724. {——————————————————————————————————————————————————————————————————————————————————————————}
  725. { Drag Sounds                                                                                }
  726. {                                                                                            }
  727. { Drag sounds are looped for the duration of the drag.                                        }
  728. {                                                                                            }
  729. { Call BeginThemeDragSound at the start of the drag.                                        }
  730. { Call EndThemeDragSound when the drag has finished.                                        }
  731. {                                                                                            }
  732. { Note that in order to maintain a consistent user experience, only one drag sound may     }
  733. { occur at a time.  The sound should be attached to a mouse action, start after the         }
  734. { mouse goes down and stop when the mouse is released.                                        }
  735. {——————————————————————————————————————————————————————————————————————————————————————————}
  736.     kThemeDragSoundNone            = 0;
  737.     kThemeDragSoundMoveWindow    = 'wmov';
  738.     kThemeDragSoundGrowWindow    = 'wgro';
  739.     kThemeDragSoundMoveUtilWindow = 'umov';
  740.     kThemeDragSoundGrowUtilWindow = 'ugro';
  741.     kThemeDragSoundMoveDialog    = 'dmov';
  742.     kThemeDragSoundMoveAlert    = 'amov';
  743.     kThemeDragSoundMoveIcon        = 'imov';
  744.     kThemeDragSoundSliderThumb    = 'slth';
  745.     kThemeDragSoundSliderGhost    = 'slgh';
  746.     kThemeDragSoundScrollBarThumb = 'sbth';
  747.     kThemeDragSoundScrollBarGhost = 'sbgh';
  748.     kThemeDragSoundScrollBarArrowDecreasing = 'sbad';
  749.     kThemeDragSoundScrollBarArrowIncreasing = 'sbai';
  750.     kThemeDragSoundDragging        = 'drag';
  751.  
  752.  
  753. TYPE
  754.     ThemeDragSoundKind                    = OSType;
  755. {——————————————————————————————————————————————————————————————————————————}
  756. { State-change sounds                                                        }
  757. {                                                                            }
  758. { State-change sounds are played asynchonously as a one-shot.                }
  759. {                                                                            }
  760. { Call PlayThemeSound to play the sound.  The sound will play                }
  761. { asynchronously until complete, then stop automatically.                    }
  762. {——————————————————————————————————————————————————————————————————————————}
  763.  
  764. CONST
  765.     kThemeSoundNone                = 0;
  766.     kThemeSoundMenuOpen            = 'mnuo';                        {  menu sounds  }
  767.     kThemeSoundMenuClose        = 'mnuc';
  768.     kThemeSoundMenuItemHilite    = 'mnui';
  769.     kThemeSoundMenuItemRelease    = 'mnus';
  770.     kThemeSoundWindowClosePress    = 'wclp';                        {  window sounds  }
  771.     kThemeSoundWindowCloseEnter    = 'wcle';
  772.     kThemeSoundWindowCloseExit    = 'wclx';
  773.     kThemeSoundWindowCloseRelease = 'wclr';
  774.     kThemeSoundWindowZoomPress    = 'wzmp';
  775.     kThemeSoundWindowZoomEnter    = 'wzme';
  776.     kThemeSoundWindowZoomExit    = 'wzmx';
  777.     kThemeSoundWindowZoomRelease = 'wzmr';
  778.     kThemeSoundWindowCollapsePress = 'wcop';
  779.     kThemeSoundWindowCollapseEnter = 'wcoe';
  780.     kThemeSoundWindowCollapseExit = 'wcox';
  781.     kThemeSoundWindowCollapseRelease = 'wcor';
  782.     kThemeSoundWindowDragBoundary = 'wdbd';
  783.     kThemeSoundUtilWinClosePress = 'uclp';                        {  utility window sounds  }
  784.     kThemeSoundUtilWinCloseEnter = 'ucle';
  785.     kThemeSoundUtilWinCloseExit    = 'uclx';
  786.     kThemeSoundUtilWinCloseRelease = 'uclr';
  787.     kThemeSoundUtilWinZoomPress    = 'uzmp';
  788.     kThemeSoundUtilWinZoomEnter    = 'uzme';
  789.     kThemeSoundUtilWinZoomExit    = 'uzmx';
  790.     kThemeSoundUtilWinZoomRelease = 'uzmr';
  791.     kThemeSoundUtilWinCollapsePress = 'ucop';
  792.     kThemeSoundUtilWinCollapseEnter = 'ucoe';
  793.     kThemeSoundUtilWinCollapseExit = 'ucox';
  794.     kThemeSoundUtilWinCollapseRelease = 'ucor';
  795.     kThemeSoundUtilWinDragBoundary = 'udbd';
  796.     kThemeSoundWindowOpen        = 'wopn';                        {  window close and zoom action  }
  797.     kThemeSoundWindowClose        = 'wcls';
  798.     kThemeSoundWindowZoomIn        = 'wzmi';
  799.     kThemeSoundWindowZoomOut    = 'wzmo';
  800.     kThemeSoundWindowCollapseUp    = 'wcol';
  801.     kThemeSoundWindowCollapseDown = 'wexp';
  802.     kThemeSoundWindowActivate    = 'wact';
  803.     kThemeSoundUtilWindowOpen    = 'uopn';
  804.     kThemeSoundUtilWindowClose    = 'ucls';
  805.     kThemeSoundUtilWindowZoomIn    = 'uzmi';
  806.     kThemeSoundUtilWindowZoomOut = 'uzmo';
  807.     kThemeSoundUtilWindowCollapseUp = 'ucol';
  808.     kThemeSoundUtilWindowCollapseDown = 'uexp';
  809.     kThemeSoundUtilWindowActivate = 'uact';
  810.     kThemeSoundDialogOpen        = 'dopn';
  811.     kThemeSoundDialogClose        = 'dlgc';
  812.     kThemeSoundAlertOpen        = 'aopn';
  813.     kThemeSoundAlertClose        = 'altc';
  814.     kThemeSoundPopupWindowOpen    = 'pwop';
  815.     kThemeSoundPopupWindowClose    = 'pwcl';
  816.     kThemeSoundButtonPress        = 'btnp';                        {  button  }
  817.     kThemeSoundButtonEnter        = 'btne';
  818.     kThemeSoundButtonExit        = 'btnx';
  819.     kThemeSoundButtonRelease    = 'btnr';
  820.     kThemeSoundDefaultButtonPress = 'dbtp';                        {  default button  }
  821.     kThemeSoundDefaultButtonEnter = 'dbte';
  822.     kThemeSoundDefaultButtonExit = 'dbtx';
  823.     kThemeSoundDefaultButtonRelease = 'dbtr';
  824.     kThemeSoundCancelButtonPress = 'cbtp';                        {  cancel button  }
  825.     kThemeSoundCancelButtonEnter = 'cbte';
  826.     kThemeSoundCancelButtonExit    = 'cbtx';
  827.     kThemeSoundCancelButtonRelease = 'cbtr';
  828.     kThemeSoundCheckboxPress    = 'chkp';                        {  checkboxes  }
  829.     kThemeSoundCheckboxEnter    = 'chke';
  830.     kThemeSoundCheckboxExit        = 'chkx';
  831.     kThemeSoundCheckboxRelease    = 'chkr';
  832.     kThemeSoundRadioPress        = 'radp';                        {  radio buttons  }
  833.     kThemeSoundRadioEnter        = 'rade';
  834.     kThemeSoundRadioExit        = 'radx';
  835.     kThemeSoundRadioRelease        = 'radr';
  836.     kThemeSoundScrollArrowPress    = 'sbap';                        {  scroll bars  }
  837.     kThemeSoundScrollArrowEnter    = 'sbae';
  838.     kThemeSoundScrollArrowExit    = 'sbax';
  839.     kThemeSoundScrollArrowRelease = 'sbar';
  840.     kThemeSoundScrollEndOfTrack    = 'sbte';
  841.     kThemeSoundScrollTrackPress    = 'sbtp';
  842.     kThemeSoundSliderEndOfTrack    = 'slte';                        {  sliders  }
  843.     kThemeSoundSliderTrackPress    = 'sltp';
  844.     kThemeSoundBalloonOpen        = 'blno';                        {  help balloons  }
  845.     kThemeSoundBalloonClose        = 'blnc';
  846.     kThemeSoundBevelPress        = 'bevp';                        {  Bevel buttons  }
  847.     kThemeSoundBevelEnter        = 'beve';
  848.     kThemeSoundBevelExit        = 'bevx';
  849.     kThemeSoundBevelRelease        = 'bevr';
  850.     kThemeSoundLittleArrowUpPress = 'laup';                        {  Little Arrows  }
  851.     kThemeSoundLittleArrowDnPress = 'ladp';
  852.     kThemeSoundLittleArrowEnter    = 'lare';
  853.     kThemeSoundLittleArrowExit    = 'larx';
  854.     kThemeSoundLittleArrowUpRelease = 'laur';
  855.     kThemeSoundLittleArrowDnRelease = 'ladr';
  856.     kThemeSoundPopupPress        = 'popp';                        {  Popup Buttons  }
  857.     kThemeSoundPopupEnter        = 'pope';
  858.     kThemeSoundPopupExit        = 'popx';
  859.     kThemeSoundPopupRelease        = 'popr';
  860.     kThemeSoundDisclosurePress    = 'dscp';                        {  Disclosure Buttons  }
  861.     kThemeSoundDisclosureEnter    = 'dsce';
  862.     kThemeSoundDisclosureExit    = 'dscx';
  863.     kThemeSoundDisclosureRelease = 'dscr';
  864.     kThemeSoundTabPressed        = 'tabp';                        {  Tabs  }
  865.     kThemeSoundTabEnter            = 'tabe';
  866.     kThemeSoundTabExit            = 'tabx';
  867.     kThemeSoundTabRelease        = 'tabr';
  868.     kThemeSoundDragTargetHilite    = 'dthi';                        {  drag manager  }
  869.     kThemeSoundDragTargetUnhilite = 'dtuh';
  870.     kThemeSoundDragTargetDrop    = 'dtdr';
  871.     kThemeSoundEmptyTrash        = 'ftrs';                        {  finder  }
  872.     kThemeSoundSelectItem        = 'fsel';
  873.     kThemeSoundNewItem            = 'fnew';
  874.     kThemeSoundReceiveDrop        = 'fdrp';
  875.     kThemeSoundCopyDone            = 'fcpd';
  876.     kThemeSoundResolveAlias        = 'fral';
  877.     kThemeSoundLaunchApp        = 'flap';
  878.     kThemeSoundDiskInsert        = 'dski';
  879.     kThemeSoundDiskEject        = 'dske';
  880.     kThemeSoundFinderDragOnIcon    = 'fdon';
  881.     kThemeSoundFinderDragOffIcon = 'fdof';
  882.  
  883.  
  884. TYPE
  885.     ThemeSoundKind                        = OSType;
  886. {——————————————————————————————————————————————————————————————————————————————————————————}
  887. { Window Metrics                                                                            }
  888. {——————————————————————————————————————————————————————————————————————————————————————————}
  889. {     Window metrics are used by the Appearance manager to fill in the blanks necessary to     }
  890. {     draw windows. If a value is not appropriate for the type of window, be sure to fill in    }
  891. {     the slot in the structure with zero.    For the popupTabOffset parameter, you can pass a}
  892. {     real value based on the left edge of the window. This value might be interpreted in a     }
  893. {     different manner when depending on the value of the popupTabPosition field. The values    }
  894. {     you can pass into popupTabPosition are:                                                    }
  895. {                                                                                            }
  896. {    kThemePopupTabNormalPosition                                                            }
  897. {        Starts the tab left edge at the position indicated by the popupTabOffset field.        }
  898. {                                                                                            }
  899. {    kThemePopupTabCenterOnWindow                                                            }
  900. {        tells us to ignore the offset field and instead simply center the width of the         }
  901. {        handle on the window.                                                                }
  902. {                                                                                            }
  903. {    kThemePopupTabCenterOnOffset                                                            }
  904. {        tells us to center the width of the handle around the value passed in offset.        }
  905. {                                                                                            }
  906. {     The Appearance Manager will try its best to accomodate the requested placement, but may }
  907. {     move the handle slightly to make it fit correctly.                                        }
  908. {                                                                                            }
  909.  
  910. CONST
  911.     kThemePopupTabNormalPosition = 0;
  912.     kThemePopupTabCenterOnWindow = 1;
  913.     kThemePopupTabCenterOnOffset = 2;
  914.  
  915.  
  916. TYPE
  917.     ThemeWindowMetricsPtr = ^ThemeWindowMetrics;
  918.     ThemeWindowMetrics = RECORD
  919.         metricSize:                UInt16;                                    {  should be always be sizeof( ThemeWindowMetrics ) }
  920.         titleHeight:            SInt16;
  921.         titleWidth:                SInt16;
  922.         popupTabOffset:            SInt16;
  923.         popupTabWidth:            SInt16;
  924.         popupTabPosition:        UInt16;
  925.     END;
  926.  
  927. {——————————————————————————————————————————————————————————————————————————————————————————}
  928. { Drawing State                                                                            }
  929. {——————————————————————————————————————————————————————————————————————————————————————————}
  930.     ThemeDrawingState = ^LONGINT;
  931. {——————————————————————————————————————————————————————————————————————————————————————————}
  932. { Callback procs                                                                            }
  933. {——————————————————————————————————————————————————————————————————————————————————————————}
  934. {$IFC TYPED_FUNCTION_POINTERS}
  935.     ThemeTabTitleDrawProcPtr = PROCEDURE({CONST}VAR bounds: Rect; style: ThemeTabStyle; direction: ThemeTabDirection; depth: SInt16; isColorDev: BOOLEAN; userData: UInt32);
  936. {$ELSEC}
  937.     ThemeTabTitleDrawProcPtr = ProcPtr;
  938. {$ENDC}
  939.  
  940. {$IFC TYPED_FUNCTION_POINTERS}
  941.     ThemeEraseProcPtr = PROCEDURE({CONST}VAR bounds: Rect; eraseData: UInt32; depth: SInt16; isColorDev: BOOLEAN);
  942. {$ELSEC}
  943.     ThemeEraseProcPtr = ProcPtr;
  944. {$ENDC}
  945.  
  946. {$IFC TYPED_FUNCTION_POINTERS}
  947.     ThemeButtonDrawProcPtr = PROCEDURE({CONST}VAR bounds: Rect; kind: ThemeButtonKind; VAR info: ThemeButtonDrawInfo; userData: UInt32; depth: SInt16; isColorDev: BOOLEAN);
  948. {$ELSEC}
  949.     ThemeButtonDrawProcPtr = ProcPtr;
  950. {$ENDC}
  951.  
  952. {$IFC TYPED_FUNCTION_POINTERS}
  953.     WindowTitleDrawingProcPtr = PROCEDURE({CONST}VAR bounds: Rect; depth: SInt16; colorDevice: BOOLEAN; userData: UInt32);
  954. {$ELSEC}
  955.     WindowTitleDrawingProcPtr = ProcPtr;
  956. {$ENDC}
  957.  
  958. {$IFC TYPED_FUNCTION_POINTERS}
  959.     ThemeIteratorProcPtr = FUNCTION(inFileName: Str255; resID: SInt16; inThemeSettings: Collection; inUserData: UNIV Ptr): BOOLEAN;
  960. {$ELSEC}
  961.     ThemeIteratorProcPtr = ProcPtr;
  962. {$ENDC}
  963.  
  964.     ThemeTabTitleDrawUPP = UniversalProcPtr;
  965.     ThemeEraseUPP = UniversalProcPtr;
  966.     ThemeButtonDrawUPP = UniversalProcPtr;
  967.     WindowTitleDrawingUPP = UniversalProcPtr;
  968.     ThemeIteratorUPP = UniversalProcPtr;
  969.  
  970. CONST
  971.     uppThemeTabTitleDrawProcInfo = $00036AC0;
  972.     uppThemeEraseProcInfo = $00001BC0;
  973.     uppThemeButtonDrawProcInfo = $0001BEC0;
  974.     uppWindowTitleDrawingProcInfo = $000036C0;
  975.     uppThemeIteratorProcInfo = $00003ED0;
  976.  
  977. FUNCTION NewThemeTabTitleDrawProc(userRoutine: ThemeTabTitleDrawProcPtr): ThemeTabTitleDrawUPP;
  978.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  979.     INLINE $2E9F;
  980.     {$ENDC}
  981.  
  982. FUNCTION NewThemeEraseProc(userRoutine: ThemeEraseProcPtr): ThemeEraseUPP;
  983.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  984.     INLINE $2E9F;
  985.     {$ENDC}
  986.  
  987. FUNCTION NewThemeButtonDrawProc(userRoutine: ThemeButtonDrawProcPtr): ThemeButtonDrawUPP;
  988.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  989.     INLINE $2E9F;
  990.     {$ENDC}
  991.  
  992. FUNCTION NewWindowTitleDrawingProc(userRoutine: WindowTitleDrawingProcPtr): WindowTitleDrawingUPP;
  993.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  994.     INLINE $2E9F;
  995.     {$ENDC}
  996.  
  997. FUNCTION NewThemeIteratorProc(userRoutine: ThemeIteratorProcPtr): ThemeIteratorUPP;
  998.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  999.     INLINE $2E9F;
  1000.     {$ENDC}
  1001.  
  1002. PROCEDURE CallThemeTabTitleDrawProc({CONST}VAR bounds: Rect; style: ThemeTabStyle; direction: ThemeTabDirection; depth: SInt16; isColorDev: BOOLEAN; userData: UInt32; userRoutine: ThemeTabTitleDrawUPP);
  1003.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1004.     INLINE $205F, $4E90;
  1005.     {$ENDC}
  1006.  
  1007. PROCEDURE CallThemeEraseProc({CONST}VAR bounds: Rect; eraseData: UInt32; depth: SInt16; isColorDev: BOOLEAN; userRoutine: ThemeEraseUPP);
  1008.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1009.     INLINE $205F, $4E90;
  1010.     {$ENDC}
  1011.  
  1012. PROCEDURE CallThemeButtonDrawProc({CONST}VAR bounds: Rect; kind: ThemeButtonKind; VAR info: ThemeButtonDrawInfo; userData: UInt32; depth: SInt16; isColorDev: BOOLEAN; userRoutine: ThemeButtonDrawUPP);
  1013.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1014.     INLINE $205F, $4E90;
  1015.     {$ENDC}
  1016.  
  1017. PROCEDURE CallWindowTitleDrawingProc({CONST}VAR bounds: Rect; depth: SInt16; colorDevice: BOOLEAN; userData: UInt32; userRoutine: WindowTitleDrawingUPP);
  1018.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1019.     INLINE $205F, $4E90;
  1020.     {$ENDC}
  1021.  
  1022. FUNCTION CallThemeIteratorProc(inFileName: Str255; resID: SInt16; inThemeSettings: Collection; inUserData: UNIV Ptr; userRoutine: ThemeIteratorUPP): BOOLEAN;
  1023.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1024.     INLINE $205F, $4E90;
  1025.     {$ENDC}
  1026. {——————————————————————————————————————————————————————————————————————————————————}
  1027. { Menu Drawing callbacks                                                            }
  1028. {——————————————————————————————————————————————————————————————————————————————————}
  1029.  
  1030. TYPE
  1031. {$IFC TYPED_FUNCTION_POINTERS}
  1032.     MenuTitleDrawingProcPtr = PROCEDURE({CONST}VAR inBounds: Rect; inDepth: SInt16; inIsColorDevice: BOOLEAN; inUserData: SInt32);
  1033. {$ELSEC}
  1034.     MenuTitleDrawingProcPtr = ProcPtr;
  1035. {$ENDC}
  1036.  
  1037. {$IFC TYPED_FUNCTION_POINTERS}
  1038.     MenuItemDrawingProcPtr = PROCEDURE({CONST}VAR inBounds: Rect; inDepth: SInt16; inIsColorDevice: BOOLEAN; inUserData: SInt32);
  1039. {$ELSEC}
  1040.     MenuItemDrawingProcPtr = ProcPtr;
  1041. {$ENDC}
  1042.  
  1043.     MenuTitleDrawingUPP = UniversalProcPtr;
  1044.     MenuItemDrawingUPP = UniversalProcPtr;
  1045.  
  1046. CONST
  1047.     uppMenuTitleDrawingProcInfo = $000036C0;
  1048.     uppMenuItemDrawingProcInfo = $000036C0;
  1049.  
  1050. FUNCTION NewMenuTitleDrawingProc(userRoutine: MenuTitleDrawingProcPtr): MenuTitleDrawingUPP;
  1051.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1052.     INLINE $2E9F;
  1053.     {$ENDC}
  1054.  
  1055. FUNCTION NewMenuItemDrawingProc(userRoutine: MenuItemDrawingProcPtr): MenuItemDrawingUPP;
  1056.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1057.     INLINE $2E9F;
  1058.     {$ENDC}
  1059.  
  1060. PROCEDURE CallMenuTitleDrawingProc({CONST}VAR inBounds: Rect; inDepth: SInt16; inIsColorDevice: BOOLEAN; inUserData: SInt32; userRoutine: MenuTitleDrawingUPP);
  1061.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1062.     INLINE $205F, $4E90;
  1063.     {$ENDC}
  1064.  
  1065. PROCEDURE CallMenuItemDrawingProc({CONST}VAR inBounds: Rect; inDepth: SInt16; inIsColorDevice: BOOLEAN; inUserData: SInt32; userRoutine: MenuItemDrawingUPP);
  1066.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1067.     INLINE $205F, $4E90;
  1068.     {$ENDC}
  1069. {——————————————————————————————————————————————————————————————————————————————————}
  1070. {    Appearance Manager APIs                                                            }
  1071. {——————————————————————————————————————————————————————————————————————————————————}
  1072. { Registering Appearance-Savvy Applications }
  1073. FUNCTION RegisterAppearanceClient: OSStatus;
  1074.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1075.     INLINE $303C, $0015, $AA74;
  1076.     {$ENDC}
  1077. FUNCTION UnregisterAppearanceClient: OSStatus;
  1078.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1079.     INLINE $303C, $0016, $AA74;
  1080.     {$ENDC}
  1081. FUNCTION IsAppearanceClient({CONST}VAR process: ProcessSerialNumber): BOOLEAN;
  1082.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1083.     INLINE $303C, $FFFF, $AA74;
  1084.     {$ENDC}
  1085. {****************************************************************************
  1086.     NOTES ON THEME BRUSHES
  1087.     Theme brushes can be either colors or patterns, depending on the theme.
  1088.     Because of this, you should be prepared to handle the case where a brush
  1089.     is a pattern and save and restore the pnPixPat and bkPixPat fields of
  1090.     your GrafPorts when saving the fore and back colors. Also, since patterns
  1091.     in bkPixPat override the background color of the window, you should use
  1092.     BackPat to set your background pattern to a normal white pattern. This
  1093.     will ensure that you can use RGBBackColor to set your back color to white,
  1094.     call EraseRect and get the expected results.
  1095. ****************************************************************************}
  1096.  
  1097. FUNCTION SetThemePen(inBrush: ThemeBrush; inDepth: SInt16; inIsColorDevice: BOOLEAN): OSStatus;
  1098.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1099.     INLINE $303C, $0001, $AA74;
  1100.     {$ENDC}
  1101. FUNCTION SetThemeBackground(inBrush: ThemeBrush; inDepth: SInt16; inIsColorDevice: BOOLEAN): OSStatus;
  1102.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1103.     INLINE $303C, $0002, $AA74;
  1104.     {$ENDC}
  1105. FUNCTION SetThemeTextColor(inColor: ThemeTextColor; inDepth: SInt16; inIsColorDevice: BOOLEAN): OSStatus;
  1106.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1107.     INLINE $303C, $0003, $AA74;
  1108.     {$ENDC}
  1109. FUNCTION SetThemeWindowBackground(inWindow: WindowPtr; inBrush: ThemeBrush; inUpdate: BOOLEAN): OSStatus;
  1110.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1111.     INLINE $303C, $0004, $AA74;
  1112.     {$ENDC}
  1113. { Window Placards, Headers and Frames }
  1114. FUNCTION DrawThemeWindowHeader({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1116.     INLINE $303C, $0005, $AA74;
  1117.     {$ENDC}
  1118. FUNCTION DrawThemeWindowListViewHeader({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1119.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1120.     INLINE $303C, $0006, $AA74;
  1121.     {$ENDC}
  1122. FUNCTION DrawThemePlacard({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1123.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1124.     INLINE $303C, $0007, $AA74;
  1125.     {$ENDC}
  1126. FUNCTION DrawThemeEditTextFrame({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1127.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1128.     INLINE $303C, $0009, $AA74;
  1129.     {$ENDC}
  1130. FUNCTION DrawThemeListBoxFrame({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1131.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1132.     INLINE $303C, $000A, $AA74;
  1133.     {$ENDC}
  1134. { Keyboard Focus Drawing }
  1135. FUNCTION DrawThemeFocusRect({CONST}VAR inRect: Rect; inHasFocus: BOOLEAN): OSStatus;
  1136.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1137.     INLINE $303C, $000B, $AA74;
  1138.     {$ENDC}
  1139. { Dialog Group Boxes and Separators }
  1140. FUNCTION DrawThemePrimaryGroup({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1141.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1142.     INLINE $303C, $000C, $AA74;
  1143.     {$ENDC}
  1144. FUNCTION DrawThemeSecondaryGroup({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1145.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1146.     INLINE $303C, $000D, $AA74;
  1147.     {$ENDC}
  1148. FUNCTION DrawThemeSeparator({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1149.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1150.     INLINE $303C, $000E, $AA74;
  1151.     {$ENDC}
  1152. {—————————————————————————————— BEGIN APPEARANCE 1.0.1 ————————————————————————————————————————————}
  1153. { The following Appearance Manager APIs are only available }
  1154. { in Appearance 1.0.1 or later                             }
  1155. FUNCTION DrawThemeModelessDialogFrame({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1156.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1157.     INLINE $303C, $0008, $AA74;
  1158.     {$ENDC}
  1159. FUNCTION DrawThemeGenericWell({CONST}VAR inRect: Rect; inState: ThemeDrawState; inFillCenter: BOOLEAN): OSStatus;
  1160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1161.     INLINE $303C, $0022, $AA74;
  1162.     {$ENDC}
  1163. FUNCTION DrawThemeFocusRegion(inRegion: RgnHandle; inHasFocus: BOOLEAN): OSStatus;
  1164.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1165.     INLINE $303C, $0023, $AA74;
  1166.     {$ENDC}
  1167. FUNCTION IsThemeInColor(inDepth: SInt16; inIsColorDevice: BOOLEAN): BOOLEAN;
  1168.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1169.     INLINE $303C, $0024, $AA74;
  1170.     {$ENDC}
  1171. { IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will }
  1172. { most likely return an error }
  1173. FUNCTION GetThemeAccentColors(VAR outColors: CTabHandle): OSStatus;
  1174.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1175.     INLINE $303C, $0025, $AA74;
  1176.     {$ENDC}
  1177. FUNCTION DrawThemeMenuBarBackground({CONST}VAR inBounds: Rect; inState: ThemeMenuBarState; inAttributes: UInt32): OSStatus;
  1178.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1179.     INLINE $303C, $0018, $AA74;
  1180.     {$ENDC}
  1181. FUNCTION DrawThemeMenuTitle({CONST}VAR inMenuBarRect: Rect; {CONST}VAR inTitleRect: Rect; inState: ThemeMenuState; inAttributes: UInt32; inTitleProc: MenuTitleDrawingUPP; inTitleData: UInt32): OSStatus;
  1182.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1183.     INLINE $303C, $0019, $AA74;
  1184.     {$ENDC}
  1185. FUNCTION GetThemeMenuBarHeight(VAR outHeight: SInt16): OSStatus;
  1186.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1187.     INLINE $303C, $001A, $AA74;
  1188.     {$ENDC}
  1189. FUNCTION DrawThemeMenuBackground({CONST}VAR inMenuRect: Rect; inMenuType: ThemeMenuType): OSStatus;
  1190.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1191.     INLINE $303C, $001B, $AA74;
  1192.     {$ENDC}
  1193. FUNCTION GetThemeMenuBackgroundRegion({CONST}VAR inMenuRect: Rect; menuType: ThemeMenuType; region: RgnHandle): OSStatus;
  1194.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1195.     INLINE $303C, $001C, $AA74;
  1196.     {$ENDC}
  1197. FUNCTION DrawThemeMenuItem({CONST}VAR inMenuRect: Rect; {CONST}VAR inItemRect: Rect; inVirtualMenuTop: SInt16; inVirtualMenuBottom: SInt16; inState: ThemeMenuState; inItemType: ThemeMenuItemType; inDrawProc: MenuItemDrawingUPP; inUserData: UInt32): OSStatus;
  1198.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1199.     INLINE $303C, $001D, $AA74;
  1200.     {$ENDC}
  1201. FUNCTION DrawThemeMenuSeparator({CONST}VAR inItemRect: Rect): OSStatus;
  1202.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1203.     INLINE $303C, $001E, $AA74;
  1204.     {$ENDC}
  1205. FUNCTION GetThemeMenuSeparatorHeight(VAR outHeight: SInt16): OSStatus;
  1206.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1207.     INLINE $303C, $001F, $AA74;
  1208.     {$ENDC}
  1209. FUNCTION GetThemeMenuItemExtra(inItemType: ThemeMenuItemType; VAR outHeight: SInt16; VAR outWidth: SInt16): OSStatus;
  1210.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1211.     INLINE $303C, $0020, $AA74;
  1212.     {$ENDC}
  1213. FUNCTION GetThemeMenuTitleExtra(VAR outWidth: SInt16; inIsSquished: BOOLEAN): OSStatus;
  1214.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1215.     INLINE $303C, $0021, $AA74;
  1216.     {$ENDC}
  1217. {——————————————————————————————— BEGIN APPEARANCE 1.1 —————————————————————————————————————————————}
  1218. {—————————————————————————————————— THEME SWITCHING ———————————————————————————————————————————————}
  1219. FUNCTION GetTheme(ioCollection: Collection): OSStatus;
  1220. FUNCTION SetTheme(ioCollection: Collection): OSStatus;
  1221. FUNCTION IterateThemes(inProc: ThemeIteratorUPP; inUserData: UNIV Ptr): OSStatus;
  1222. {———————————————————————————————————————— TABS ————————————————————————————————————————————————————}
  1223. FUNCTION DrawThemeTabPane({CONST}VAR inRect: Rect; inState: ThemeDrawState): OSStatus;
  1224. FUNCTION DrawThemeTab({CONST}VAR inRect: Rect; inStyle: ThemeTabStyle; inDirection: ThemeTabDirection; labelProc: ThemeTabTitleDrawUPP; userData: UInt32): OSStatus;
  1225. FUNCTION GetThemeTabRegion({CONST}VAR inRect: Rect; inStyle: ThemeTabStyle; inDirection: ThemeTabDirection; ioRgn: RgnHandle): OSStatus;
  1226. {——————————————————————————————————————— CURSORS ——————————————————————————————————————————————————}
  1227. FUNCTION SetThemeCursor(inCursor: ThemeCursor): OSStatus;
  1228. FUNCTION SetAnimatedThemeCursor(inCursor: ThemeCursor; inAnimationStep: UInt32): OSStatus;
  1229. {———————————————————————————————— CONTROL STYLE SETTINGS ——————————————————————————————————————————}
  1230. FUNCTION GetThemeScrollBarThumbStyle(VAR outStyle: ThemeScrollBarThumbStyle): OSStatus;
  1231. FUNCTION GetThemeScrollBarArrowStyle(VAR outStyle: ThemeScrollBarArrowStyle): OSStatus;
  1232. FUNCTION GetThemeCheckBoxStyle(VAR outStyle: ThemeCheckBoxStyle): OSStatus;
  1233. {———————————————————————————————————————— FONTS ———————————————————————————————————————————————————}
  1234. FUNCTION UseThemeFont(inFontID: ThemeFontID; inScript: ScriptCode): OSStatus;
  1235. FUNCTION GetThemeFont(inFontID: ThemeFontID; inScript: ScriptCode; outFontName: StringPtr; VAR outFontSize: SInt16; VAR outStyle: Style): OSStatus;
  1236. {———————————————————————————————————————— TRACKS ——————————————————————————————————————————————————}
  1237. FUNCTION DrawThemeTrack({CONST}VAR drawInfo: ThemeTrackDrawInfo; rgnGhost: RgnHandle; eraseProc: ThemeEraseUPP; eraseData: UInt32): OSStatus;
  1238. FUNCTION HitTestThemeTrack({CONST}VAR drawInfo: ThemeTrackDrawInfo; mousePoint: Point; VAR partHit: ControlPartCode): BOOLEAN;
  1239. FUNCTION GetThemeTrackBounds({CONST}VAR drawInfo: ThemeTrackDrawInfo; VAR bounds: Rect): OSStatus;
  1240. FUNCTION GetThemeTrackThumbRgn({CONST}VAR drawInfo: ThemeTrackDrawInfo; thumbRgn: RgnHandle): OSStatus;
  1241. FUNCTION GetThemeTrackDragRect({CONST}VAR drawInfo: ThemeTrackDrawInfo; VAR dragRect: Rect): OSStatus;
  1242. FUNCTION DrawThemeTrackTickMarks({CONST}VAR drawInfo: ThemeTrackDrawInfo; numTicks: ItemCount; eraseProc: ThemeEraseUPP; eraseData: UInt32): OSStatus;
  1243. FUNCTION GetThemeTrackThumbPositionFromOffset({CONST}VAR drawInfo: ThemeTrackDrawInfo; thumbOffset: Point; VAR relativePosition: SInt32): OSStatus;
  1244. FUNCTION GetThemeTrackThumbPositionFromRegion({CONST}VAR drawInfo: ThemeTrackDrawInfo; thumbRgn: RgnHandle; VAR relativePosition: SInt32): OSStatus;
  1245. FUNCTION GetThemeTrackLiveValue({CONST}VAR drawInfo: ThemeTrackDrawInfo; relativePosition: SInt32; VAR value: SInt32): OSStatus;
  1246. {——————————————————————————————————— SCROLLBAR ARROWS —————————————————————————————————————————————}
  1247. FUNCTION DrawThemeScrollBarArrows({CONST}VAR bounds: Rect; enableState: ByteParameter; pressState: ByteParameter; isHoriz: BOOLEAN; VAR trackBounds: Rect): OSStatus;
  1248. FUNCTION GetThemeScrollBarTrackRect({CONST}VAR bounds: Rect; enableState: ByteParameter; pressState: ByteParameter; isHoriz: BOOLEAN; VAR trackBounds: Rect): OSStatus;
  1249. FUNCTION HitTestThemeScrollBarArrows({CONST}VAR scrollBarBounds: Rect; enableState: ByteParameter; pressState: ByteParameter; isHoriz: BOOLEAN; ptHit: Point; VAR trackBounds: Rect; VAR partcode: ControlPartCode): BOOLEAN;
  1250. {———————————————————————————————————————— WINDOWS —————————————————————————————————————————————————}
  1251. FUNCTION GetThemeWindowRegion(flavor: ThemeWindowType; {CONST}VAR contRect: Rect; state: ThemeDrawState; {CONST}VAR metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; winRegion: WindowRegionCode; rgn: RgnHandle): OSStatus;
  1252. FUNCTION DrawThemeWindowFrame(flavor: ThemeWindowType; {CONST}VAR contRect: Rect; state: ThemeDrawState; {CONST}VAR metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; titleProc: WindowTitleDrawingUPP; titleData: UInt32): OSStatus;
  1253. FUNCTION DrawThemeTitleBarWidget(flavor: ThemeWindowType; {CONST}VAR contRect: Rect; state: ThemeDrawState; {CONST}VAR metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; widget: ThemeTitleBarWidget): OSStatus;
  1254. FUNCTION GetThemeWindowRegionHit(flavor: ThemeWindowType; {CONST}VAR inContRect: Rect; state: ThemeDrawState; {CONST}VAR metrics: ThemeWindowMetrics; inAttributes: ThemeWindowAttributes; inPoint: Point; VAR outRegionHit: WindowRegionCode): BOOLEAN;
  1255. FUNCTION DrawThemeScrollBarDelimiters(flavor: ThemeWindowType; {CONST}VAR inContRect: Rect; state: ThemeDrawState; attributes: ThemeWindowAttributes): OSStatus;
  1256. {———————————————————————————————————————— BUTTONS —————————————————————————————————————————————————}
  1257. FUNCTION DrawThemeButton({CONST}VAR inBounds: Rect; inKind: ThemeButtonKind; {CONST}VAR inNewInfo: ThemeButtonDrawInfo; {CONST}VAR inPrevInfo: ThemeButtonDrawInfo; inEraseProc: ThemeEraseUPP; inLabelProc: ThemeButtonDrawUPP; inUserData: UInt32): OSStatus;
  1258. FUNCTION GetThemeButtonRegion({CONST}VAR inBounds: Rect; inKind: ThemeButtonKind; {CONST}VAR inNewInfo: ThemeButtonDrawInfo; outRegion: RgnHandle): OSStatus;
  1259. FUNCTION GetThemeButtonContentBounds({CONST}VAR inBounds: Rect; inKind: ThemeButtonKind; {CONST}VAR inDrawInfo: ThemeButtonDrawInfo; VAR outBounds: Rect): OSStatus;
  1260. FUNCTION GetThemeButtonBackgroundBounds({CONST}VAR inBounds: Rect; inKind: ThemeButtonKind; {CONST}VAR inDrawInfo: ThemeButtonDrawInfo; VAR outBounds: Rect): OSStatus;
  1261.  
  1262. {————————————————————————————————————— INTERFACE SOUNDS ———————————————————————————————————————————}
  1263. FUNCTION PlayThemeSound(kind: ThemeSoundKind): OSStatus;
  1264.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1265.     INLINE $303C, $0026, $AA74;
  1266.     {$ENDC}
  1267. FUNCTION BeginThemeDragSound(kind: ThemeDragSoundKind): OSStatus;
  1268.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1269.     INLINE $303C, $0027, $AA74;
  1270.     {$ENDC}
  1271. FUNCTION EndThemeDragSound: OSStatus;
  1272.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1273.     INLINE $303C, $0028, $AA74;
  1274.     {$ENDC}
  1275. {—————————————————————————————————————— PRIMITIVES ————————————————————————————————————————————————}
  1276. FUNCTION DrawThemeTickMark({CONST}VAR bounds: Rect; state: ThemeDrawState): OSStatus;
  1277. FUNCTION DrawThemeChasingArrows({CONST}VAR bounds: Rect; index: UInt32; state: ThemeDrawState; eraseProc: ThemeEraseUPP; eraseData: UInt32): OSStatus;
  1278. FUNCTION DrawThemePopupArrow({CONST}VAR bounds: Rect; orientation: ThemeArrowOrientation; size: ThemePopupArrowSize; state: ThemeDrawState; eraseProc: ThemeEraseUPP; eraseData: UInt32): OSStatus;
  1279. FUNCTION DrawThemeStandaloneGrowBox(origin: Point; growDirection: ThemeGrowDirection; isSmall: BOOLEAN; state: ThemeDrawState): OSStatus;
  1280. FUNCTION DrawThemeStandaloneNoGrowBox(origin: Point; growDirection: ThemeGrowDirection; isSmall: BOOLEAN; state: ThemeDrawState): OSStatus;
  1281. FUNCTION GetThemeStandaloneGrowBoxBounds(origin: Point; growDirection: ThemeGrowDirection; isSmall: BOOLEAN; VAR bounds: Rect): OSStatus;
  1282. {————————————————————————————————————— DRAWING STATE ——————————————————————————————————————————————}
  1283. { The following routines help you save and restore the drawing state in a theme-savvy manner. With    }
  1284. { these weapons in your arsenal, there is no grafport you cannot tame.    Use ThemeGetDrawingState to    }
  1285. { get the current drawing settings for the current port. It will return an opaque object for you     }
  1286. { to pass into ThemeSetDrawingState later on. When you are finished with the state, call the        }
  1287. { ThemeDisposeDrawingState routine. You can alternatively pass true into the inDisposeNow             }
  1288. { parameter of the ThemeSetDrawingState routine.  You can use this routine to copy the drawing        }
  1289. { state from one port to another as well.                                                            }
  1290. FUNCTION NormalizeThemeDrawingState: OSStatus;
  1291. FUNCTION GetThemeDrawingState(VAR outState: ThemeDrawingState): OSStatus;
  1292. FUNCTION SetThemeDrawingState(inState: ThemeDrawingState; inDisposeNow: BOOLEAN): OSStatus;
  1293. FUNCTION DisposeThemeDrawingState(inState: ThemeDrawingState): OSStatus;
  1294. {————————————————————————————————————— MISCELLANEOUS ——————————————————————————————————————————————}
  1295. { ApplyThemeBackground is used to set up the background for embedded controls     }
  1296. { It is normally called by controls that are embedders. The standard controls    }
  1297. { call this API to ensure a correct background for the current theme. You pass }
  1298. { in the same rectangle you would if you were calling the drawing primitive.    }
  1299. FUNCTION ApplyThemeBackground(inKind: ThemeBackgroundKind; {CONST}VAR bounds: Rect; inState: ThemeDrawState; inDepth: SInt16; inColorDev: BOOLEAN): OSStatus;
  1300. FUNCTION SetThemeTextColorForWindow(window: WindowPtr; isActive: BOOLEAN; depth: SInt16; isColorDev: BOOLEAN): OSStatus;
  1301. FUNCTION IsValidAppearanceFileType(fileType: OSType): BOOLEAN;
  1302. FUNCTION GetThemeBrushAsColor(inBrush: ThemeBrush; inDepth: SInt16; inColorDev: BOOLEAN; VAR outColor: RGBColor): OSStatus;
  1303. FUNCTION GetThemeTextColor(inColor: ThemeTextColor; inDepth: SInt16; inColorDev: BOOLEAN; VAR outColor: RGBColor): OSStatus;
  1304. {——————————————————————————————————————————————————————————————————————————————————————————————————}
  1305. { Obsolete symbolic names                                                                            }
  1306. {——————————————————————————————————————————————————————————————————————————————————————————————————}
  1307. { Obsolete error codes - use the new ones, s'il vous plait / kudasai }
  1308.  
  1309. CONST
  1310.     appearanceBadBrushIndexErr    = -30560;                        {  pattern index invalid  }
  1311.     appearanceProcessRegisteredErr = -30561;
  1312.     appearanceProcessNotRegisteredErr = -30562;
  1313.     appearanceBadTextColorIndexErr = -30563;
  1314.     appearanceThemeHasNoAccents    = -30564;
  1315.     appearanceBadCursorIndexErr    = -30565;
  1316.  
  1317.     kThemeActiveDialogBackgroundBrush = 1;
  1318.     kThemeInactiveDialogBackgroundBrush = 2;
  1319.     kThemeActiveAlertBackgroundBrush = 3;
  1320.     kThemeInactiveAlertBackgroundBrush = 4;
  1321.     kThemeActiveModelessDialogBackgroundBrush = 5;
  1322.     kThemeInactiveModelessDialogBackgroundBrush = 6;
  1323.     kThemeActiveUtilityWindowBackgroundBrush = 7;
  1324.     kThemeInactiveUtilityWindowBackgroundBrush = 8;
  1325.     kThemeListViewSortColumnBackgroundBrush = 9;
  1326.     kThemeListViewBackgroundBrush = 10;
  1327.     kThemeIconLabelBackgroundBrush = 11;
  1328.     kThemeListViewSeparatorBrush = 12;
  1329.     kThemeChasingArrowsBrush    = 13;
  1330.     kThemeDragHiliteBrush        = 14;
  1331.     kThemeDocumentWindowBackgroundBrush = 15;
  1332.     kThemeFinderWindowBackgroundBrush = 16;
  1333.  
  1334.     kThemeActiveScrollBarDelimiterBrush = 17;
  1335.     kThemeInactiveScrollBarDelimiterBrush = 18;
  1336.     kThemeFocusHighlightBrush    = 19;
  1337.     kThemeActivePopupArrowBrush    = 20;
  1338.     kThemePressedPopupArrowBrush = 21;
  1339.     kThemeInactivePopupArrowBrush = 22;
  1340.     kThemeAppleGuideCoachmarkBrush = 23;
  1341.  
  1342.     kThemeActiveDialogTextColor    = 1;
  1343.     kThemeInactiveDialogTextColor = 2;
  1344.     kThemeActiveAlertTextColor    = 3;
  1345.     kThemeInactiveAlertTextColor = 4;
  1346.     kThemeActiveModelessDialogTextColor = 5;
  1347.     kThemeInactiveModelessDialogTextColor = 6;
  1348.     kThemeActiveWindowHeaderTextColor = 7;
  1349.     kThemeInactiveWindowHeaderTextColor = 8;
  1350.     kThemeActivePlacardTextColor = 9;
  1351.     kThemeInactivePlacardTextColor = 10;
  1352.     kThemePressedPlacardTextColor = 11;
  1353.     kThemeActivePushButtonTextColor = 12;
  1354.     kThemeInactivePushButtonTextColor = 13;
  1355.     kThemePressedPushButtonTextColor = 14;
  1356.     kThemeActiveBevelButtonTextColor = 15;
  1357.     kThemeInactiveBevelButtonTextColor = 16;
  1358.     kThemePressedBevelButtonTextColor = 17;
  1359.     kThemeActivePopupButtonTextColor = 18;
  1360.     kThemeInactivePopupButtonTextColor = 19;
  1361.     kThemePressedPopupButtonTextColor = 20;
  1362.     kThemeIconLabelTextColor    = 21;
  1363.     kThemeListViewTextColor        = 22;
  1364.  
  1365.     kThemeActiveDocumentWindowTitleTextColor = 23;
  1366.     kThemeInactiveDocumentWindowTitleTextColor = 24;
  1367.     kThemeActiveMovableModalWindowTitleTextColor = 25;
  1368.     kThemeInactiveMovableModalWindowTitleTextColor = 26;
  1369.     kThemeActiveUtilityWindowTitleTextColor = 27;
  1370.     kThemeInactiveUtilityWindowTitleTextColor = 28;
  1371.     kThemeActivePopupWindowTitleColor = 29;
  1372.     kThemeInactivePopupWindowTitleColor = 30;
  1373.     kThemeActiveRootMenuTextColor = 31;
  1374.     kThemeSelectedRootMenuTextColor = 32;
  1375.     kThemeDisabledRootMenuTextColor = 33;
  1376.     kThemeActiveMenuItemTextColor = 34;
  1377.     kThemeSelectedMenuItemTextColor = 35;
  1378.     kThemeDisabledMenuItemTextColor = 36;
  1379.     kThemeActivePopupLabelTextColor = 37;
  1380.     kThemeInactivePopupLabelTextColor = 38;
  1381.  
  1382.     kAEThemeSwitch                = 'thme';                        {  Event ID's: Theme Switched  }
  1383.  
  1384.     kThemeNoAdornment            = 0;
  1385.     kThemeDefaultAdornment        = $01;
  1386.     kThemeFocusAdornment        = $04;
  1387.     kThemeRightToLeftAdornment    = $10;
  1388.     kThemeDrawIndicatorOnly        = $20;
  1389.  
  1390.     kThemeBrushPassiveAreaFill    = 25;
  1391.  
  1392. {$ALIGN RESET}
  1393. {$POP}
  1394.  
  1395. {$SETC UsingIncludes := AppearanceIncludes}
  1396.  
  1397. {$ENDC} {__APPEARANCE__}
  1398.  
  1399. {$IFC NOT UsingIncludes}
  1400.  END.
  1401. {$ENDC}
  1402.